package com.cby.android.sample.repository

import com.cby.android.sample.bean.tianxing.TXApiResponse
import com.cby.android.sample.bean.tianxing.TXWxNewArticleBean
import com.cby.android.sample.repository.api.ApiSource
import com.cby.android.sample.repository.api.TianXingService

/**
 * @description: TianXingRepository
 * @author: ChenBaoYang
 * @createDate: 2022/5/9 11:37 上午
 */
interface TianXingApi{

    suspend fun loadWxNewArticleList(key:String, num: Int, page:Int): TXApiResponse<TXWxNewArticleBean>
}

class TianXingApiImpl : TianXingApi{

    private var service: TianXingService = ApiSource.getTianXingService(TianXingService::class.java)

    override suspend fun loadWxNewArticleList(
        key: String,
        num: Int,
        page: Int
    ) = service.loadWxNewArticleList(key, num, page)

}
